#include <QtGui/QApplication>
#include <QLocale>
#include <QTranslator>
#include <QDebug>

#include "mixiVoice.h"

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);

	app.setOrganizationName("atmark");
	app.setApplicationName("mixiVoice");
	app.setApplicationVersion("0.1.0");

	const QString locale = QLocale::system().name();
	QTranslator qtTrans;
	qtTrans.load("qt_" + locale);
	app.installTranslator(&qtTrans);

	QTranslator appTrans;
#ifdef Q_OS_MAC
	appTrans.load(QString("%1/../Resources/translations/%2_%3").arg(app.applicationDirPath()).arg(app.applicationName()).arg(locale));
#else
	appTrans.load(QString("%1/translations/%2_%3").arg(app.applicationDirPath()).arg(app.applicationName()).arg(locale));
#endif
	app.installTranslator(&appTrans);

	mixiVoice w;
	w.show();

	return app.exec();
}
